package net.println.kotlin.chapter4.innerclass

/**
 * Created by benny on 4/4/17.
 */
open class Outter{
    val a: Int = 0

    inner class Inner{
        val a: Int = 5

        fun hello(){
            println(this@Outter.a)
        }
    }
    fun doPause(){

    }
}

interface OnClickListener{
    fun onClick()
}

class View{
    var onClickListener: OnClickListener? = null
}

fun main(args: Array<String>) {
    val inner = Outter().Inner()

    val view = View()

    view.onClickListener = object : Outter(), OnClickListener {
        override fun onClick() {
            //在kotlin内名内部类，可继承和实现接口
            doPause()
            println(a)
            TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
        }

    }
}